<template>
  <div class="Control">
    <div class="Control-top">
      <div class="pressureBox">
        <span>{{ pressure }}</span>
        <span>MPa</span>
        <div>最低空呼压力</div>
      </div>
      <div class="pressureBox">
        <span>{{ heartAlarm }}</span>
        <span>pm</span>
        <div>心率偏离预警</div>
      </div>
      <div class="maxTempBox">
        <span>{{ maxTemp }}</span>
        <span>˚C</span>
        <div>最高温度</div>
      </div>
    </div>
    <div class="Control-center">
      <div v-for="item in controlList" :key="item.id" class="listBox">
        <div class="leftBox">
          <img src="@/assets/image/personImg.png " alt="" />
        </div>
        <div class="rightBox">
          <div class="rightBox_top">
            <div class="rightTitle">{{ item.address }}</div>
            <div class="rightTitle">{{ item.name }}</div>
          </div>
          <div class="rightBox_center">
            <div>
              <img src="@/assets/image/pressIcon.png" alt="" />
              <span>{{ item.pressure }}MPa</span>
            </div>
            <span class="ml-[70px]">{{ '剩余' + item.remaining + 'min' }}</span>
          </div>
          <div class="right_bottom">
            <div>
              <img src="@/assets/image/heartIcon.png" alt="" />
              <span>{{ item.heartAlarm }}pm</span>
            </div>
            <div>
              <img src="@/assets/image/tempIcon.png" alt="" />
              <span>{{ item.maxTemp }}˚C</span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup lang="ts">
const pressure = ref('15')
const heartAlarm = ref('90')
const maxTemp = ref('90')
const controlList = reactive([
  {
    id: 0,
    address: '石门坎站',
    name: '李立君',
    imgUrl: ' ',
    pressure: '21',
    remaining: '32',
    heartAlarm: '87',
    maxTemp: '72',
  },
  {
    id: 1,
    address: '石门坎站',
    name: '李立君',
    imgUrl: ' ',
    pressure: '21',
    remaining: '32',
    heartAlarm: '87',
    maxTemp: '72',
  },
  {
    id: 2,
    address: '石门坎站',
    name: '李立君',
    imgUrl: ' ',
    pressure: '21',
    remaining: '32',
    heartAlarm: '87',
    maxTemp: '72',
  },
  {
    id: 3,
    address: '石门坎站',
    name: '李立君',
    imgUrl: ' ',
    pressure: '21',
    remaining: '32',
    heartAlarm: '87',
    maxTemp: '72',
  },
])
</script>
<style lang="less" scoped>
.Control {
  padding: 10px;

  .Control-top {
    display: flex;
    justify-content: space-around;
    background: rgba(1, 10, 15, 0.5);
    padding-bottom: 10px;

    .pressureBox {
      span {
        color: #abf04b;
        font-family: Digitaldream;

        &:nth-of-type(1) {
          font-size: 40px;
          font-weight: bolder;
          margin-right: 10px;
        }
      }

      div {
        font-size: 16px;
        color: #fff;
      }
    }

    .maxTempBox {
      span {
        color: red;
        font-family: Digitaldream;

        &:nth-of-type(1) {
          font-size: 40px;
          font-weight: bolder;
          margin-right: 10px;
        }
      }

      div {
        font-size: 16px;
        color: #fff;
      }
    }
  }

  .Control-center {
    height: 600px;
    overflow-y: auto;

    .listBox {
      background: rgba(1, 10, 15, 0.5);
      height: 120px;
      border-radius: 8px;
      margin-top: 10px;
      display: flex;
      padding: 10px;

      .leftBox {
        width: 25%;

        img {
          width: 80px;
          height: 100px;
        }
      }

      .rightBox {
        width: 70%;

        .rightBox_top {
          color: #fff;
          display: flex;

          .rightTitle {
            font-size: 20px;
            font-weight: bolder;
            margin-right: 30px;
          }
        }

        .rightBox_center {
          padding: 5px;
          display: flex;

          align-items: center;

          img {
            display: inline-block;
            margin-right: 10px;
          }

          span {
            color: #fff;
            font-size: 16px;
          }
        }

        .right_bottom {
          margin-top: 5px;
          color: #fff;
          font-size: 16px;
          display: flex;
          align-items: center;

          img {
            display: inline-block;
            margin-right: 10px;
          }

          div {
            width: 48%;
            padding: 5px;

            &:nth-of-type(1) {
              margin-right: 10px;
            }
          }
        }
      }
    }
  }
}
</style>
